import cv2 as cv
import numpy as np

img = np.zeros((400,400, 3), np.uint8)

#线
cv.line(img, pt1=(0,0), pt2=(399, 399), color=(255,0,0), thickness=2)

#矩形
cv.rectangle(img, pt1=(100, 100), pt2=(250,150), color=(0,255,0), thickness=2)

#圆
cv.circle(img, center=(200,200), radius=50, color=(0,0,255), thickness=2, lineType=cv.LINE_AA)

#文字
cv.putText(img, "hello", (200,200), cv.FONT_HERSHEY_SIMPLEX, 4, (255,255,255), 2, cv.LINE_AA)

cv.imshow("drawing", img)
cv.waitKey(0)

